document.addEventListener('plusready', function(){
	var webview = plus.webview.currentWebview()
	plus.key.addEventListener("backbutton",function(){  
		if (window.location.hash.indexOf('#/home') == -1 ) {
			webview.back()
		}else{
			plus.runtime.quit()
		}
	});  
});